import { Input, Select, AutoComplete } from "antd";
import React, { useState, useEffect } from 'react';
import { queryUsers } from "@/services/user";

export const IdToName = props => {

    const { ID:id } = props;
    const [name, setName] = useState('');

    useEffect(() => {
        // console.log('===>> response')
        queryUsers({ id }, true).then(content => {
            // console.log("==>> content ============>", content)
            setName(content.nickName || '用户已注销')
        })
    }, [])

    return name;
}